Stop using GtkBox's pack-type child prop in UI files
authorTimm Bäder <mail@baedert.org>
Wed, 26 Dec 2018 07:55:46 +0000 (08:55 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 24 Jan 2019 00:30:46 +0000 (19:30 -0500)
demos/widget-factory/widget-factory.ui
gtk/inspector/recorder.ui
gtk/ui/gtkappchooserdialog.ui
gtk/ui/gtkdialog.ui
gtk/ui/gtkfilechooserdialog.ui
gtk/ui/gtkfilechooserwidget.ui
gtk/ui/gtkprintunixdialog.ui
testsuite/gtk/builder.c

index 1ebb6efbde8461465f7c79dede085346920ab048..d1ad3ffaff30eb84074930f444e9bb66bf1ba400 100644 (file)
@@ -3057,9 +3057,6 @@ microphone-sensitivity-medium-symbolic</property>
                                               <class name="small-button"/>
                                             </style>
                                           </object>
-                                          <packing>
-                                            <property name="pack-type">end</property>
-                                          </packing>
                                         </child>
                                       </object>
                                     </child>
@@ -3090,9 +3087,6 @@ microphone-sensitivity-medium-symbolic</property>
                                               <class name="small-button"/>
                                             </style>
                                           </object>
-                                          <packing>
-                                            <property name="pack-type">end</property>
-                                          </packing>
                                         </child>
                                       </object>
                                     </child>
index 7f3f0ccc89d6f5ee3ee6a7eb53f3b7503c1f133e..2ee6e90d0f9a7fee269663b26d6da8f738b56a4b 100644 (file)
@@ -31,6 +31,8 @@
                 <property name="icon-name">insert-object-symbolic</property>
                 <property name="tooltip-text" translatable="yes">Add debug nodes</property>
                 <property name="active" bind-source="GtkInspectorRecorder" bind-property="debug-nodes" bind-flags="bidirectional|sync-create"/>
+                <property name="halign">start</property>
+                <property name="hexpand">1</property>
               </object>
             </child>
             <child>
@@ -41,9 +43,6 @@
                 <property name="tooltip-text" translatable="yes">Save selected node</property>
                 <signal name="clicked" handler="render_node_save"/>
               </object>
-              <packing>
-                <property name="pack-type">end</property>
-              </packing>
             </child>
           </object>
         </child>
index 671712567169e9935702b2345c0d7572601e0267..9c09d757c7e5795269782e8d6f140ed6dd449673 100644 (file)
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="layout-style">end</property>
+            <property name="hexpand">1</property>
+            <property name="halign">end</property>
           </object>
-          <packing>
-            <property name="pack-type">end</property>
-          </packing>
         </child>
         <child>
           <object class="GtkBox" id="inner_box">
index 1a9728a7e634da9cbdb4375fecf4f250c8275f9e..d2d2638947b2e1d01ee9a3425cc1daa1f69a9e01 100644 (file)
                   <class name="dialog-action-area"/>
                 </style>
               </object>
-              <packing>
-                <property name="pack-type">end</property>
-              </packing>
             </child>
           </object>
-          <packing>
-            <property name="pack-type">end</property>
-          </packing>
         </child>
       </object>
     </child>
index 4b75045015c10bdbfc269c2ef31bd276fe160cff..1b37a4ce0e834ba831459f804c0408bcf266efb4 100644 (file)
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="margin">6</property>
             <property name="layout-style">end</property>
+            <property name="hexpand">1</property>
+            <property name="halign">end</property>
           </object>
-          <packing>
-            <property name="pack-type">end</property>
-          </packing>
         </child>
         <child>
           <object class="GtkFileChooserWidget" id="widget">
index fbb53bd76e0ce9d43388f5d48548993207b8285d..5da98365cfb9041675977617541f43400b0fca0e 100644 (file)
                                         <property name="icon-name">folder-new-symbolic</property>
                                         <signal name="notify::active" handler="new_folder_popover_active"/>
                                       </object>
-                                      <packing>
-                                        <property name="pack-type">end</property>
-                                        <property name="position">1</property>
-                                      </packing>
                                     </child>
                                   </object>
                                   <packing>
                                       <object class="GtkSpinner" id="search_spinner">
                                         <property name="visible">0</property>
                                       </object>
-                                      <packing>
-                                        <property name="pack-type">end</property>
-                                      </packing>
                                     </child>
                                   </object>
                                   <packing>
                     <property name="valign">start</property>
                     <signal name="changed" handler="filter_combo_changed" swapped="no"/>
                   </object>
-                  <packing>
-                    <property name="pack-type">end</property>
-                  </packing>
                 </child>
               </object>
               <packing>
               </packing>
             </child>
           </object>
-          <packing>
-            <property name="position">1</property>
-            <property name="pack-type">end</property>
-          </packing>
         </child>
       </object>
     </child>
index ad005f4e0fb5dd05fc5480b523e42fdb3353fdef..056877c5c0ad12c21ffc6dcd9f436d4d419d37a7 100644 (file)
                 </child>
               </object>
               <packing>
-                <property name="pack-type">end</property>
                 <property name="position">1</property>
               </packing>
             </child>
index e662570a2672fb66229dafe87be1cbc5a6a2a564..6d320bf4545b016be154f40b6bb0a93dad3f2f87 100644 (file)
@@ -983,22 +983,16 @@ test_child_properties (void)
     "  <object class=\"GtkBox\" id=\"vbox1\">"
     "    <child>"
     "      <object class=\"GtkLabel\" id=\"label1\"/>"
-    "      <packing>"
-    "        <property name=\"pack-type\">start</property>"
-    "      </packing>"
     "    </child>"
     "    <child>"
     "      <object class=\"GtkLabel\" id=\"label2\"/>"
-    "      <packing>"
-    "        <property name=\"pack-type\">end</property>"
-    "      </packing>"
     "    </child>"
     "  </object>"
     "</interface>";
 
   GObject *label, *vbox;
-  GtkPackType pack_type;
-  
+  int position;
+
   builder = builder_new_from_string (buffer1, -1, NULL);
   vbox = gtk_builder_get_object (builder, "vbox1");
   g_assert (GTK_IS_BOX (vbox));
@@ -1007,19 +1001,19 @@ test_child_properties (void)
   g_assert (GTK_IS_LABEL (label));
   gtk_container_child_get (GTK_CONTAINER (vbox),
                            GTK_WIDGET (label),
-                           "pack-type",
-                           &pack_type,
+                           "position",
+                           &position,
                            NULL);
-  g_assert (pack_type == GTK_PACK_START);
-  
+  g_assert_cmpint (position, ==, 0);
+
   label = gtk_builder_get_object (builder, "label2");
   g_assert (GTK_IS_LABEL (label));
   gtk_container_child_get (GTK_CONTAINER (vbox),
                            GTK_WIDGET (label),
-                           "pack-type",
-                           &pack_type,
+                           "position",
+                           &position,
                            NULL);
-  g_assert (pack_type == GTK_PACK_END);
+  g_assert_cmpint (position, ==, 1);
 
   g_object_unref (builder);
 }
@@ -1787,9 +1781,6 @@ test_reference_counting (void)
     "        <property name=\"orientation\">vertical</property>"
     "    <child>"
     "      <object class=\"GtkLabel\" id=\"label1\"/>"
-    "      <packing>"
-    "        <property name=\"pack-type\">start</property>"
-    "      </packing>"
     "    </child>"
     "  </object>"
     "</interface>";